'use strict'
const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}

module.exports = {
    lintOnSave: false,
    productionSourceMap: false,

    devServer: {                //记住，别写错了devServer//设置本地默认端口  选填
        port: 8010,
        disableHostCheck: true,
        proxy: {                 //设置代理，必须填
            '/erp': {              //设置拦截器  拦截器格式   斜杠+拦截器名字，名字可以自己定
                target: 'https://www.guorii.cn',     //代理的目标地址
                changeOrigin: true,              //是否设置同源，输入是的
                pathRewrite: {                   //路径重写
                    '^/erp': '/erp'                     //选择忽略拦截器里面的单词
                }
            }
        }
    },
    publicPath: './',

    configureWebpack: {
        // provide the app's title in webpack's name field, so that
        // it can be accessed in index.html to inject the correct title.
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },

}